package io.renren.modules.erp.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.erp.dao.BaseParamDao;
import io.renren.modules.erp.entity.BaseParamEntity;
import io.renren.modules.erp.service.BaseParamService;


@Service("baseParamService")
public class BaseParamServiceImpl extends ServiceImpl<BaseParamDao, BaseParamEntity> implements BaseParamService {
	
	@Autowired
    private BaseParamDao baseParamDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<BaseParamEntity> page = this.selectPage(
                new Query<BaseParamEntity>(params).getPage(),
                new EntityWrapper<BaseParamEntity>()
        );

        return new PageUtils(page);
    }

	@Override
	public List<BaseParamEntity> selectByCode(String parmCode) {
		return baseParamDao.selectByCode(parmCode);
	}

}
